<?php 
define('__ROOT__', dirname(dirname(__FILE__))); 
include_once(__ROOT__.'/includes/header.php'); ?>
<link rel="stylesheet" href="<?php echo base_url("assets/css/jquery.fancybox.css"); ?>" />
<div class="span9">
	<ul class="breadcrumb">
		<li>
			<a href="<?php echo base_url('/home'); ?>">Home</a> <span class="divider">/</span>
		</li>
		<li>
			<a href="<?php echo base_url('/automobiles'); ?>">Car and Vehicles</a>
		</li>
		<?php if (isset($bookmark)): ?>
		<span class="divider">/</span>
		<li>
			<?php echo $bookmark; ?></a>
		</li>
		<?php endif;?>
	</ul>
<div class="main_content detail-product">						
<h3 class="title"><?php echo $autodetails->brand_name ?> - <?php echo $autodetails->auto_type ?></h3>			
<div class="row-fluid">
	<div class="span9">
		<div class="row-fluid">
		<div class="span5">
			<a href="<?php echo site_url((isset($autodetails->primary_image) ? '/assets/uploads/automobiles/' . $autodetails->primary_image : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 1"><img alt="" src="<?php echo site_url((isset($autodetails->primary_image) ? '/assets/uploads/automobiles/' . $autodetails->primary_image : '/assets/uploads/dummy.png')); ?>"></a>												
			<ul class="thumbnails small">								
				<li class="span4">
					<a href="<?php echo site_url((isset($autodetails->small_image1) ? '/assets/uploads/automobiles/' . $autodetails->small_image1 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 2"><img src="<?php echo site_url((isset($autodetails->small_image1) ? '/assets/uploads/automobiles/' . $autodetails->primary_image : '/assets/uploads/dummy.png')); ?>" alt=""></a>
				</li>								
				<li class="span4">
					<a href="<?php echo site_url((isset($autodetails->small_image2) ? '/assets/uploads/automobiles/' . $autodetails->small_image2 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 3"><img src="<?php echo site_url((isset($autodetails->small_image2) ? '/assets/uploads/automoibles/' . $autodetails->small_image2 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
				</li>													
				<li class="span4">
					<a href="<?php echo site_url((isset($autodetails->small_image3) ? '/assets/uploads/automobiles/' . $autodetails->small_image3 : '/assets/uploads/dummy.png')); ?>" class="thumbnail" data-fancybox-group="group1" title="Description 4"><img src="<?php echo site_url((isset($autodetails->small_image3) ? '/assets/uploads/automoibles/' . $autodetails->small_image3 : '/assets/uploads/dummy.png')); ?>" alt=""></a>
				</li>
				
			</ul>
		</div>
		<div class="span7">

			<p><?php echo $autodetails->title; ?></p>
			<table class="table table-striped">
			<tbody>
				<tr>
				  <td>Price:</td>
				  <td class="span6"><span style="font-size: 22px; color: #f8834b;"><?php echo $autodetails->price; ?></span><sup><?php echo $autodetails->price_denote;?></sup></td>
				  <td style="border-left: 1px solid;">Condition:</td>
				  <td class="span6">Used</td>
				</tr>
				<tr>
				  <td class="span6">Model & Year:</td>
				  <td><?php echo $autodetails->model; ?> (Year)</td>
				  <td>Colour:</td>
				  <td class="span8">Black/White (T)
				</tr>
				<tr>
				   <td>Body Style:</td>
				  <td><?php echo $autodetails->auto_type; ?></td>
				   <td>Mileage:</td>
				  <td>T</td>
				</tr>
				<tr>
				  <td>Registration Year:</td>
				  <td>T</td>
				   <td>Fuel Type:</td>
				  <td>T</td>
				</tr>
				<tr>
				   <td>No of seats:</td>
				  <td>T</td>
				  <td class="span6">Engine Size:</td>
				  <td>T</td>
				</tr>
				
			</tbody>
			</table>
		</div>
		<div class="span7">
			<div class="contact-information" style="background-color: white;">
					<h5>CONTACT INFORMATION</h5>
					<p><strong>Contact Name: </strong><?php echo $autodetails->contact_person; ?><br/>
					<strong>Phone: </strong> <?php echo $autodetails->contact_no; ?><br/>
					<strong>E-mail: </strong> <a href="#myModal" role="button" data-toggle="modal"><?php echo $autodetails->contact_email; ?></a><br/>
					<strong>URL: </strong> <a href="#" target="_blank"></a></p>
			</div>
		</div>
		<div class="span12">
			<h4>Other Information: </h4>
			<?php echo $autodetails->description; ?></div>						
		</div>	
		<div class="row-fluid">
		<div class="span12">
		<ul class="nav nav-tabs" id="myTab">
			<li class="active"><a href="#home">Advertiser's Other Ads</a></li>
			<li><a href="#profile">MESSAGE TO ADVERTISER</a></li>
		</ul>							 
		<div class="tab-content">
			<div class="tab-pane active" id="home">
				<div class="span7 well">
				<div class="other_info">
					<?php foreach ($others as $other): ?>
						 <p>
							<strong><a href=""><?php echo $other->title; ?></a></strong>
							<br/>Brand: <a href="<?php echo base_url('automobiles/browse/brandID/' . $autodetails->id ); ?>"><?php echo $other->brand_name; ?></a>
							 Vehicle Type: <a href="<?php echo base_url('automobiles/browse/typeID_' . $autodetails->id ); ?>"><?php echo $other->auto_type; ?></a>- <?php echo date ("d/m/Y",strtotime($other->posted_date)); ?>					
						</p>
					<?php endforeach ?>
				</div>
			</div>
			</div>
			<div class="tab-pane" id="profile">
			<form class="form-horizontal">
			  <div class="control-group">
				<label class="control-label" for="inputEmail">Email</label>
				<div class="controls">
				  <input type="text" id="inputEmail" placeholder="Email">
				</div>
			  </div>
			  <div class="control-group">
				<label class="control-label" for="inputName">Name</label>
				<div class="controls">
				  <input type="text" id="inputName" placeholder="Full Name">
				</div>
			  </div>
			  <div class="control-group">
				<label class="control-label" for="inputMsg">Message</label>
				<div class="controls">
				  <input type="textarea" id="inputMsg" placeholder="Message">
				  <input type="hidden" id="inputUrl" value="<?php echo base_url(); ?>api/message/send/format/json">
				</div>
			  </div>
			  <div class="control-group">
				<div class="controls">
				   <a id="messagesubmit" class="btn btn-primary">Send</a>
				   <button type="reset" class="btn">Cancel</button>
				</div>
			  </div>
			</form>
			</div>
		</div>							
		</div>							
		</div>										
</div>
</div>
</div>
<?php 
include_once(__ROOT__.'/includes/footer.php'); 	
?>


   
